package org.admanager.scamapping.plugin.scamapping.diagram.providers;

import java.util.HashSet;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Set;

import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.Component2EditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.Component3EditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentMappingEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentMappingSourceEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentMappingTargetEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentReference2EditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentReference3EditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentReferenceEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentReferenceMappingEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentReferenceMappingSourceEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentReferenceMappingTargetEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentService2EditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentService3EditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentServiceEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentServiceMappingEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentServiceMappingSourceEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ComponentServiceMappingTargetEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.Composite2EditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.CompositeEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.CompositeMappingEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.CompositeMappingSourceEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.CompositeMappingTargetEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.DocumentRootEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.PatternEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.Reference2EditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ReferenceEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ReferenceMappingEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ReferenceMappingSourceEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ReferenceMappingTargetEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.RootMappingEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.Service2EditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ServiceEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ServiceMappingEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ServiceMappingSourceEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.parts.ServiceMappingTargetEditPart;
import org.admanager.scamapping.plugin.scamapping.diagram.part.MappingDiagramEditorPlugin;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;

/**
 * @generated
 */
public class MappingElementTypes {

	/**
	 * @generated
	 */
	private MappingElementTypes() {
	}

	/**
	 * @generated
	 */
	private static Map/*[org.eclipse.gmf.runtime.emf.type.core.IElementType, org.eclipse.emf.ecore.ENamedElement]*/elements;

	/**
	 * @generated
	 */
	private static ImageRegistry imageRegistry;

	/**
	 * @generated
	 */
	private static Set/*[org.eclipse.gmf.runtime.emf.type.core.IElementType]*/KNOWN_ELEMENT_TYPES;

	/**
	 * @generated
	 */
	public static final IElementType RootMapping_1000 = getElementType("org.admanager.scamapping.plugin.diagram.RootMapping_1000"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentReferenceMapping_2001 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentReferenceMapping_2001"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentServiceMapping_2002 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentServiceMapping_2002"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType CompositeMapping_2003 = getElementType("org.admanager.scamapping.plugin.diagram.CompositeMapping_2003"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentMapping_2004 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentMapping_2004"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ServiceMapping_2005 = getElementType("org.admanager.scamapping.plugin.diagram.ServiceMapping_2005"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ReferenceMapping_2006 = getElementType("org.admanager.scamapping.plugin.diagram.ReferenceMapping_2006"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType DocumentRoot_2008 = getElementType("org.admanager.scamapping.plugin.diagram.DocumentRoot_2008"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Pattern_2009 = getElementType("org.admanager.scamapping.plugin.diagram.Pattern_2009"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Composite_3001 = getElementType("org.admanager.scamapping.plugin.diagram.Composite_3001"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Component_3002 = getElementType("org.admanager.scamapping.plugin.diagram.Component_3002"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentReference_3003 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentReference_3003"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentService_3004 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentService_3004"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Service_3005 = getElementType("org.admanager.scamapping.plugin.diagram.Service_3005"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Reference_3006 = getElementType("org.admanager.scamapping.plugin.diagram.Reference_3006"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Component_3007 = getElementType("org.admanager.scamapping.plugin.diagram.Component_3007"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentService_3008 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentService_3008"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentReference_3009 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentReference_3009"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Composite_3010 = getElementType("org.admanager.scamapping.plugin.diagram.Composite_3010"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Component_3011 = getElementType("org.admanager.scamapping.plugin.diagram.Component_3011"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentService_3012 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentService_3012"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentReference_3013 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentReference_3013"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Service_3014 = getElementType("org.admanager.scamapping.plugin.diagram.Service_3014"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Reference_3015 = getElementType("org.admanager.scamapping.plugin.diagram.Reference_3015"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType CompositeMappingTarget_4001 = getElementType("org.admanager.scamapping.plugin.diagram.CompositeMappingTarget_4001"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ServiceMappingSource_4002 = getElementType("org.admanager.scamapping.plugin.diagram.ServiceMappingSource_4002"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ServiceMappingTarget_4003 = getElementType("org.admanager.scamapping.plugin.diagram.ServiceMappingTarget_4003"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ReferenceMappingTarget_4004 = getElementType("org.admanager.scamapping.plugin.diagram.ReferenceMappingTarget_4004"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ReferenceMappingSource_4005 = getElementType("org.admanager.scamapping.plugin.diagram.ReferenceMappingSource_4005"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentMappingTarget_4006 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentMappingTarget_4006"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentMappingSource_4007 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentMappingSource_4007"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentServiceMappingSource_4008 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentServiceMappingSource_4008"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentReferenceMappingTarget_4009 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentReferenceMappingTarget_4009"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentReferenceMappingSource_4010 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentReferenceMappingSource_4010"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType CompositeMappingSource_4011 = getElementType("org.admanager.scamapping.plugin.diagram.CompositeMappingSource_4011"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentServiceMappingTarget_4012 = getElementType("org.admanager.scamapping.plugin.diagram.ComponentServiceMappingTarget_4012"); //$NON-NLS-1$

	/**
	 * @generated
	 */
	private static ImageRegistry getImageRegistry() {
		if (imageRegistry == null) {
			imageRegistry = new ImageRegistry();
		}
		return imageRegistry;
	}

	/**
	 * @generated
	 */
	private static String getImageRegistryKey(ENamedElement element) {
		return element.getName();
	}

	/**
	 * @generated
	 */
	private static ImageDescriptor getProvidedImageDescriptor(
			ENamedElement element) {
		if (element instanceof EStructuralFeature) {
			EStructuralFeature feature = ((EStructuralFeature) element);
			EClass eContainingClass = feature.getEContainingClass();
			EClassifier eType = feature.getEType();
			if (eContainingClass != null && !eContainingClass.isAbstract()) {
				element = eContainingClass;
			} else if (eType instanceof EClass
					&& !((EClass) eType).isAbstract()) {
				element = eType;
			}
		}
		if (element instanceof EClass) {
			EClass eClass = (EClass) element;
			if (!eClass.isAbstract()) {
				return MappingDiagramEditorPlugin.getInstance()
						.getItemImageDescriptor(
								eClass.getEPackage().getEFactoryInstance()
										.create(eClass));
			}
		}
		// TODO : support structural features
		return null;
	}

	/**
	 * @generated
	 */
	public static ImageDescriptor getImageDescriptor(ENamedElement element) {
		String key = getImageRegistryKey(element);
		ImageDescriptor imageDescriptor = getImageRegistry().getDescriptor(key);
		if (imageDescriptor == null) {
			imageDescriptor = getProvidedImageDescriptor(element);
			if (imageDescriptor == null) {
				imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
			}
			getImageRegistry().put(key, imageDescriptor);
		}
		return imageDescriptor;
	}

	/**
	 * @generated
	 */
	public static Image getImage(ENamedElement element) {
		String key = getImageRegistryKey(element);
		Image image = getImageRegistry().get(key);
		if (image == null) {
			ImageDescriptor imageDescriptor = getProvidedImageDescriptor(element);
			if (imageDescriptor == null) {
				imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
			}
			getImageRegistry().put(key, imageDescriptor);
			image = getImageRegistry().get(key);
		}
		return image;
	}

	/**
	 * @generated
	 */
	public static ImageDescriptor getImageDescriptor(IAdaptable hint) {
		ENamedElement element = getElement(hint);
		if (element == null) {
			return null;
		}
		return getImageDescriptor(element);
	}

	/**
	 * @generated
	 */
	public static Image getImage(IAdaptable hint) {
		ENamedElement element = getElement(hint);
		if (element == null) {
			return null;
		}
		return getImage(element);
	}

	/**
	 * Returns 'type' of the ecore object associated with the hint.
	 * 
	 * @generated
	 */
	public static ENamedElement getElement(IAdaptable hint) {
		Object type = hint.getAdapter(IElementType.class);
		if (elements == null) {
			elements = new IdentityHashMap/*[org.eclipse.gmf.runtime.emf.type.core.IElementType, org.eclipse.emf.ecore.ENamedElement]*/();

			elements.put(
					RootMapping_1000,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getRootMapping());

			elements.put(
					ComponentReferenceMapping_2001,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getComponentReferenceMapping());

			elements.put(
					ComponentServiceMapping_2002,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getComponentServiceMapping());

			elements.put(
					CompositeMapping_2003,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getCompositeMapping());

			elements.put(
					ComponentMapping_2004,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getComponentMapping());

			elements.put(
					ServiceMapping_2005,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getServiceMapping());

			elements.put(
					ReferenceMapping_2006,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getReferenceMapping());

			elements.put(
					DocumentRoot_2008,
					org.admanager.simplifiedsca.plugin.simplifiedsca.simplifiedscaPackage.eINSTANCE
							.getDocumentRoot());

			elements.put(
					Pattern_2009,
					org.admanager.soageneralpattern.plugin.soageneralpattern.soageneralpatternPackage.eINSTANCE
							.getPattern());

			elements.put(
					Composite_3001,
					org.admanager.simplifiedsca.plugin.simplifiedsca.simplifiedscaPackage.eINSTANCE
							.getComposite());

			elements.put(
					Component_3002,
					org.admanager.simplifiedsca.plugin.simplifiedsca.simplifiedscaPackage.eINSTANCE
							.getComponent());

			elements.put(
					ComponentReference_3003,
					org.admanager.simplifiedsca.plugin.simplifiedsca.simplifiedscaPackage.eINSTANCE
							.getComponentReference());

			elements.put(
					ComponentService_3004,
					org.admanager.simplifiedsca.plugin.simplifiedsca.simplifiedscaPackage.eINSTANCE
							.getComponentService());

			elements.put(
					Service_3005,
					org.admanager.simplifiedsca.plugin.simplifiedsca.simplifiedscaPackage.eINSTANCE
							.getService());

			elements.put(
					Reference_3006,
					org.admanager.simplifiedsca.plugin.simplifiedsca.simplifiedscaPackage.eINSTANCE
							.getReference());

			elements.put(
					Component_3007,
					org.admanager.soageneralpattern.plugin.soageneralpattern.soageneralpatternPackage.eINSTANCE
							.getComponent());

			elements.put(
					ComponentService_3008,
					org.admanager.soageneralpattern.plugin.soageneralpattern.soageneralpatternPackage.eINSTANCE
							.getComponentService());

			elements.put(
					ComponentReference_3009,
					org.admanager.soageneralpattern.plugin.soageneralpattern.soageneralpatternPackage.eINSTANCE
							.getComponentReference());

			elements.put(
					Composite_3010,
					org.admanager.soageneralpattern.plugin.soageneralpattern.soageneralpatternPackage.eINSTANCE
							.getComposite());

			elements.put(
					Component_3011,
					org.admanager.soageneralpattern.plugin.soageneralpattern.soageneralpatternPackage.eINSTANCE
							.getComponent());

			elements.put(
					ComponentService_3012,
					org.admanager.soageneralpattern.plugin.soageneralpattern.soageneralpatternPackage.eINSTANCE
							.getComponentService());

			elements.put(
					ComponentReference_3013,
					org.admanager.soageneralpattern.plugin.soageneralpattern.soageneralpatternPackage.eINSTANCE
							.getComponentReference());

			elements.put(
					Service_3014,
					org.admanager.soageneralpattern.plugin.soageneralpattern.soageneralpatternPackage.eINSTANCE
							.getService());

			elements.put(
					Reference_3015,
					org.admanager.soageneralpattern.plugin.soageneralpattern.soageneralpatternPackage.eINSTANCE
							.getReference());

			elements.put(
					CompositeMappingTarget_4001,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getCompositeMapping_Target());

			elements.put(
					ServiceMappingSource_4002,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getServiceMapping_Source());

			elements.put(
					ServiceMappingTarget_4003,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getServiceMapping_Target());

			elements.put(
					ReferenceMappingTarget_4004,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getReferenceMapping_Target());

			elements.put(
					ReferenceMappingSource_4005,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getReferenceMapping_Source());

			elements.put(
					ComponentMappingTarget_4006,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getComponentMapping_Target());

			elements.put(
					ComponentMappingSource_4007,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getComponentMapping_Source());

			elements.put(
					ComponentServiceMappingSource_4008,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getComponentServiceMapping_Source());

			elements.put(
					ComponentReferenceMappingTarget_4009,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getComponentReferenceMapping_Target());

			elements.put(
					ComponentReferenceMappingSource_4010,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getComponentReferenceMapping_Source());

			elements.put(
					CompositeMappingSource_4011,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getCompositeMapping_Source());

			elements.put(
					ComponentServiceMappingTarget_4012,
					org.admanager.scamapping.plugin.scamapping.scamappingPackage.eINSTANCE
							.getComponentServiceMapping_Target());
		}
		return (ENamedElement) elements.get(type);
	}

	/**
	 * @generated
	 */
	private static IElementType getElementType(String id) {
		return ElementTypeRegistry.getInstance().getType(id);
	}

	/**
	 * @generated
	 */
	public static boolean isKnownElementType(IElementType elementType) {
		if (KNOWN_ELEMENT_TYPES == null) {
			KNOWN_ELEMENT_TYPES = new HashSet/*[org.eclipse.gmf.runtime.emf.type.core.IElementType]*/();
			KNOWN_ELEMENT_TYPES.add(RootMapping_1000);
			KNOWN_ELEMENT_TYPES.add(ComponentReferenceMapping_2001);
			KNOWN_ELEMENT_TYPES.add(ComponentServiceMapping_2002);
			KNOWN_ELEMENT_TYPES.add(CompositeMapping_2003);
			KNOWN_ELEMENT_TYPES.add(ComponentMapping_2004);
			KNOWN_ELEMENT_TYPES.add(ServiceMapping_2005);
			KNOWN_ELEMENT_TYPES.add(ReferenceMapping_2006);
			KNOWN_ELEMENT_TYPES.add(DocumentRoot_2008);
			KNOWN_ELEMENT_TYPES.add(Pattern_2009);
			KNOWN_ELEMENT_TYPES.add(Composite_3001);
			KNOWN_ELEMENT_TYPES.add(Component_3002);
			KNOWN_ELEMENT_TYPES.add(ComponentReference_3003);
			KNOWN_ELEMENT_TYPES.add(ComponentService_3004);
			KNOWN_ELEMENT_TYPES.add(Service_3005);
			KNOWN_ELEMENT_TYPES.add(Reference_3006);
			KNOWN_ELEMENT_TYPES.add(Component_3007);
			KNOWN_ELEMENT_TYPES.add(ComponentService_3008);
			KNOWN_ELEMENT_TYPES.add(ComponentReference_3009);
			KNOWN_ELEMENT_TYPES.add(Composite_3010);
			KNOWN_ELEMENT_TYPES.add(Component_3011);
			KNOWN_ELEMENT_TYPES.add(ComponentService_3012);
			KNOWN_ELEMENT_TYPES.add(ComponentReference_3013);
			KNOWN_ELEMENT_TYPES.add(Service_3014);
			KNOWN_ELEMENT_TYPES.add(Reference_3015);
			KNOWN_ELEMENT_TYPES.add(CompositeMappingTarget_4001);
			KNOWN_ELEMENT_TYPES.add(ServiceMappingSource_4002);
			KNOWN_ELEMENT_TYPES.add(ServiceMappingTarget_4003);
			KNOWN_ELEMENT_TYPES.add(ReferenceMappingTarget_4004);
			KNOWN_ELEMENT_TYPES.add(ReferenceMappingSource_4005);
			KNOWN_ELEMENT_TYPES.add(ComponentMappingTarget_4006);
			KNOWN_ELEMENT_TYPES.add(ComponentMappingSource_4007);
			KNOWN_ELEMENT_TYPES.add(ComponentServiceMappingSource_4008);
			KNOWN_ELEMENT_TYPES.add(ComponentReferenceMappingTarget_4009);
			KNOWN_ELEMENT_TYPES.add(ComponentReferenceMappingSource_4010);
			KNOWN_ELEMENT_TYPES.add(CompositeMappingSource_4011);
			KNOWN_ELEMENT_TYPES.add(ComponentServiceMappingTarget_4012);
		}
		return KNOWN_ELEMENT_TYPES.contains(elementType);
	}

	/**
	 * @generated
	 */
	public static IElementType getElementType(int visualID) {
		switch (visualID) {
		case RootMappingEditPart.VISUAL_ID:
			return RootMapping_1000;
		case ComponentReferenceMappingEditPart.VISUAL_ID:
			return ComponentReferenceMapping_2001;
		case ComponentServiceMappingEditPart.VISUAL_ID:
			return ComponentServiceMapping_2002;
		case CompositeMappingEditPart.VISUAL_ID:
			return CompositeMapping_2003;
		case ComponentMappingEditPart.VISUAL_ID:
			return ComponentMapping_2004;
		case ServiceMappingEditPart.VISUAL_ID:
			return ServiceMapping_2005;
		case ReferenceMappingEditPart.VISUAL_ID:
			return ReferenceMapping_2006;
		case DocumentRootEditPart.VISUAL_ID:
			return DocumentRoot_2008;
		case PatternEditPart.VISUAL_ID:
			return Pattern_2009;
		case CompositeEditPart.VISUAL_ID:
			return Composite_3001;
		case ComponentEditPart.VISUAL_ID:
			return Component_3002;
		case ComponentReferenceEditPart.VISUAL_ID:
			return ComponentReference_3003;
		case ComponentServiceEditPart.VISUAL_ID:
			return ComponentService_3004;
		case ServiceEditPart.VISUAL_ID:
			return Service_3005;
		case ReferenceEditPart.VISUAL_ID:
			return Reference_3006;
		case Component2EditPart.VISUAL_ID:
			return Component_3007;
		case ComponentService2EditPart.VISUAL_ID:
			return ComponentService_3008;
		case ComponentReference2EditPart.VISUAL_ID:
			return ComponentReference_3009;
		case Composite2EditPart.VISUAL_ID:
			return Composite_3010;
		case Component3EditPart.VISUAL_ID:
			return Component_3011;
		case ComponentService3EditPart.VISUAL_ID:
			return ComponentService_3012;
		case ComponentReference3EditPart.VISUAL_ID:
			return ComponentReference_3013;
		case Service2EditPart.VISUAL_ID:
			return Service_3014;
		case Reference2EditPart.VISUAL_ID:
			return Reference_3015;
		case CompositeMappingTargetEditPart.VISUAL_ID:
			return CompositeMappingTarget_4001;
		case ServiceMappingSourceEditPart.VISUAL_ID:
			return ServiceMappingSource_4002;
		case ServiceMappingTargetEditPart.VISUAL_ID:
			return ServiceMappingTarget_4003;
		case ReferenceMappingTargetEditPart.VISUAL_ID:
			return ReferenceMappingTarget_4004;
		case ReferenceMappingSourceEditPart.VISUAL_ID:
			return ReferenceMappingSource_4005;
		case ComponentMappingTargetEditPart.VISUAL_ID:
			return ComponentMappingTarget_4006;
		case ComponentMappingSourceEditPart.VISUAL_ID:
			return ComponentMappingSource_4007;
		case ComponentServiceMappingSourceEditPart.VISUAL_ID:
			return ComponentServiceMappingSource_4008;
		case ComponentReferenceMappingTargetEditPart.VISUAL_ID:
			return ComponentReferenceMappingTarget_4009;
		case ComponentReferenceMappingSourceEditPart.VISUAL_ID:
			return ComponentReferenceMappingSource_4010;
		case CompositeMappingSourceEditPart.VISUAL_ID:
			return CompositeMappingSource_4011;
		case ComponentServiceMappingTargetEditPart.VISUAL_ID:
			return ComponentServiceMappingTarget_4012;
		}
		return null;
	}

}
